package cn.zysheep.decorator;

/**
 * @ClassName: IDecorator
 * @Author: lyw
 * @Date: 2023/1/3 9:59
 * @Description: TODO(一句话描述该类的功能)
 */
public class IDecorator implements IService {
    private IService iService;

    public IDecorator(IService iService) {
        this.iService = iService;
    }

    @Override
    public void doSurfing() {
        System.out.println("IDecorator 模拟业务 前置增强");
        //增强
        iService.doSurfing();
        System.out.println("IDecorator 模拟业务 后置增强");
    }
}
